@mixin fz-m($fontSize: 16px) {
    font-size: $fontSize;
    font-family: PingFangSC-Medium, 'PingFang SC';
    font-weight: 500;
}

@mixin fz-r($fontSize: 14px) {
    font-size: $fontSize;
    font-family: PingFangSC-Regular, 'PingFang SC';
    font-weight: 400;
}

.config-card-form {
    margin: 0 auto;
    width: 414px;
    color: #33302d;
    font-family: STHeitiSC-Light, STHeitiSC;
    font-weight: 300;

    .cover-tips {
        margin-top: 20px;
        color: #969696;
        font-size: 12px;
        font-family: PingFangSC-Regular, 'PingFang SC';
        font-weight: 400;
    }

    .form-config-title {
        padding: 16px 16px 0;
        border-bottom: 16px solid #f9f9f9;

        .main-desc {
            white-space: break-spaces;
            word-break: break-all;
            word-wrap: normal;

            // padding: 0 11px;
            font-size: 14px;
            line-height: 1.5;
        }

        .form-config-textarea {
            .el-textarea__inner {
                border: none !important;
                box-shadow: none !important;
            }
        }

        h4 {
            @include fz-m(17px);
        }

        > div {
            margin: 12px 0 16px;

            @include fz-r(14px);

            color: #969696;
        }
    }

    .preview_submit {
        // width: 100%;
        padding: 16px;

        .el-button {
            width: 100%;
        }
    }
}

.config-card-cover {
    display: flex;
    align-items: center;
    width: 100%;

    // min-height: 138px;
    background-color: #f5f5f5;
    overflow: hidden;

    .cover-box {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        min-height: 138px;
    }

    .el-upload {
        width: 100%;
        height: 100%;
        line-height: 100%;
        border: none;
        background-color: #f5f5f5;
    }

    .el-upload--picture-card {
        text-align: center;
        min-height: 70px;
        position: relative;
    }

    .config-card-cover__preview {
        // position: relative;
        width: 100%;

        // height: 100%;
        .config-card-cover__preview__content {
            display: flex;
            justify-content: center;
            align-items: center;
            position: absolute;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
        }
    }

    .config-card-cover__preview:hover {
        .config-card-cover__preview__icon {
            display: block;
        }

        &::after {
            content: '';
            position: absolute;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background-color: rgb(0 0 0 / 50%);
        }
    }

    .config-card-cover__preview__icon {
        display: none;
        z-index: 999;
        color: #fff;
        padding: 20px;

        i {
            color: #fff;
            margin-top: 0;
        }
    }
}

.config-card-item {
    position: relative;
    padding: 16px;
    border: 1px solid transparent;
    background-color: #fff;

    .config-card-item__title {
        // cursor: grab;
        display: flex;
        justify-content: space-between;

        @include fz-m(17px);

        .is-require {
            color: #ff6b00;
        }

        .config-card-item__title__index {
            margin-right: 6px;
        }

        .el-input {
            display: inline-block;
            max-width: 300px;
            width: 300px;
        }

        .drag-item {
            cursor: grab;
        }
    }

    .config-card-item__desc {
        // margin: 12px 0 16px;
        color: #969696;

        @include fz-r(14px);

        & > div {
            padding: 12px 0 16px;
        }
    }

    &.config-card__actived {
        border: 1px solid #ff6b00;
    }

    .config-card-item__attr {
        text-align: center;
        position: absolute;
        right: -8px;
        top: 0;
        transform: translateX(100%);
        background-color: #fff;
        width: 76px;
        border: 1px solid #eee;
        box-shadow: 5px 5px 10px rgb(0 0 0 / 5%);
        z-index: 2000;

        div {
            cursor: pointer;

            @include fz-r;

            line-height: 40px;
        }

        div:first-child {
            border-bottom: 1px solid #eaeaea;
        }

        .config-card-item__attr__row {
            display: flex;
            justify-content: center;
            align-items: center;

            > span {
                margin-left: 6px;
            }
        }
    }

    .add-option {
        cursor: pointer;
        padding: 8px 0;
        display: flex;
        align-items: center;

        &-handle {
            margin: 0;
            padding: 16px 0;
            min-height: 52px;
            box-sizing: border-box;
            display: inline-flex;
        }

        .placehoder-style {
            color: #969696;
            font-size: 14px;
            font-family: PingFangSC-Regular, 'PingFang SC';
            font-weight: 400;
        }

        .value-style {
            color: #606266;
        }

        > span {
            word-break: break-all;
            display: inline-block;
            width: 100%;
            min-height: 12px;
        }

        img {
            vertical-align: middle;
            margin-right: 8px;
        }
    }

    .pca_textarea {
        margin-top: 12px;
    }

    .el-input {
        width: 100%;
        height: 36px;
    }

    .el-input__inner {
        height: 36px;
        line-height: 36px;
    }

    .config-card-item__upload {
        width: 80px;
        height: 80px;
        border-radius: 4px;
        border: 1px solid #eaeaea;
        display: flex;
        align-items: center;
        justify-content: center;

        .el-upload {
            width: 100%;
            height: 100%;
            border: none;
            border-radius: 0;
            background-color: #fff;
            font-size: 14px;
            display: block;
            text-align: center;

            .el-icon {
                font-size: 14px;
                margin-bottom: 4px;
                color: #ff6b00;
            }
        }
    }

    .config-card-item__carousel_img {
        width: 100%;
        height: 164px;
    }

    .config-card-item__carousel_upload {
        &.config-card-item__carousel_upload__max {
            .el-upload.el-upload--picture-card {
                width: 0;
                height: 0;
                border: 0 none;
            }

            .picture-upload-button {
                display: none;
            }
        }

        .el-upload.el-upload--picture-card {
            margin-top: 8px;
            width: 121px;
            height: 121px;
            background: #fff;
            border-radius: 4px;
            border: 1px solid #eaeaea;
            text-align: center;
        }

        .el-upload-list.el-upload-list--picture-card {
            .el-upload-list__item {
                margin-top: 8px;
                margin-bottom: 0;
                width: 121px;
                height: 121px;

                &:nth-child(3n) {
                    margin-right: 0;
                }
            }
        }
    }

    .config-card-item__carousel_empty {
        color: #969696;

        @include fz-r;

        height: 100%;
        line-height: 164px;
        text-align: center;
        background-color: #efefef;
    }

    .config-card-item__rate {
        margin-bottom: 16px;
    }

    .upload_tip {
        margin-top: 8px;
        color: #969696;

        @include fz-r(12px);
    }
}
